<?php


class IndexController extends Zend_Controller_Action
{

    public function init()
    {

        
        Header( "HTTP/1.1 302 Moved Permanently" );
        $this->_redirect('/buy');
    }
    
    
    //所有城市
    protected function getCityarr(){
    	$core = new Model_Core();
    	$city_id = intval($this->_request->getParam('city_id'));
    	$ip = $_SERVER['REMOTE_ADDR'];
    	$city_arr = $core->getNowCity($city_id, $ip);
    	return $city_arr;
    }
    
    public function indexAction()
    {
        //当前分站
        $city_arr = $this->getCityarr();
        $this->view->putcity = $city_arr[city_name];
        $this->view->putcity_id = $city_arr[city_id];
        
        
        
        

        $this->view->headTitle("【$city_arr[city_name]站】 免费 高效 绿色", 'APPEND');
        $this->view->headMeta()->setName('keywords', "$city_arr[city_name]二手车");
        $this->view->headMeta()->setName('description', "$city_arr[city_name]二手车, 淘车乐二手车为您提供最真实的二手车信息服务！");
    }

    
}

